﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.IO;

namespace BLL.Sec
{
     public  class ManageLog
    {
         OracleDAL.Sec.ManageLog ml = new OracleDAL.Sec.ManageLog();
         public string getID()//获得ID
         {
             string strRandTime;
             Random rand = new Random();
             strRandTime = DateTime.Now.ToString("yyyyMMddhhmmss");

             strRandTime = strRandTime + rand.Next(0, 999).ToString();
             return strRandTime;
         }
         public int LogonLog( string logisn,string usrisn,string username,string userip,string usermac,string  logontime, string  logouttime,string logonsucceed)
         {

             int result = ml.LogonLog(logisn, usrisn, username, userip, usermac, logontime,logouttime, logonsucceed);
             return result;

         }
          public int OperateLog( string usrisn, string username,string operationtime,string ipaddr,string macaddr,string operatename,string operateresource,string operatecontent,string operatersult)
         {
             int result = ml.OperateLog(getID(), usrisn, username, operationtime, ipaddr, macaddr, operatename, operateresource, operatecontent, operatersult);
             return result;
         }
          public int modifyLogonLog(string logisn, string  logoutTime)
          {
              int result = ml.modifyLogonLog(logisn, logoutTime);
              return result;

          }

          public DataSet getLog(string logType, string strStart, string strEnd)
          {
              DataSet ds = new DataSet();
              ds = ml.getLog(logType, strStart, strEnd);
              return ds;
          }
          public int runLog(string id, string username, string ip, string loginfo, string logtype, DateTime logtime,string logLevel)
          {

              int result = ml.runLog(id, username, ip, loginfo, logtype, logtime,logLevel);
              return result;
          }

      
    }
}
